<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>书籍录入</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
  <meta name="generator" content="Hugo 0.88.1">
  <title>Dashboard Template · Bootstrap v5.1</title>

  <link rel="canonical" href="https://getbootstrap.com/docs/5.1/examples/dashboard/">



  <!-- Bootstrap core CSS -->
  <link th:href="@{/assets/dist/css/bootstrap.min.css}" rel="stylesheet">

  <style>
    textarea{
      width: 250px;
      height: 140px;
      resize: none;
    }

    .bd-placeholder-img {
      font-size: 1.125rem;
      text-anchor: middle;
      -webkit-user-select: none;
      -moz-user-select: none;
      user-select: none;
    }

    @media (min-width: 768px) {
      .bd-placeholder-img-lg {
        font-size: 3.5rem;
      }
    }
    .a1{
      position: relative;
    }
    .a1 input{
      position: absolute;
      top: 400px;
      left: 10px;
    }
  </style>


  <!-- Custom styles for this template -->
  <link th:href="@{/css/dashboard.css}" rel="stylesheet">
</head>
<body>
<header th:replace="layout/layout::dh"></header>
<!--<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">-->
<!--  <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">图书管理系统</a>-->
<!--  <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">-->
<!--    <span class="navbar-toggler-icon"></span>-->
<!--  </button>-->
<!--  <input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search">-->
<!--  <div class="navbar-nav">-->
<!--    <div class="nav-item text-nowrap">-->
<!--      <a class="nav-link px-3" >Sign out</a>-->
<!--    </div>-->
<!--  </div>-->
<!--</header>-->

<div class="container-fluid">
  <div class="row">
    <nav th:replace="layout/layout::nav"></nav>
<!--    <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">-->
<!--      <div class="position-sticky pt-3">-->
<!--        <ul class="nav flex-column">-->
<!--          <li class="nav-item">-->
<!--            <a class="nav-link" aria-current="page" th:href="@{/books}">-->
<!--              <span data-feather="home"></span>-->
<!--              图书信息-->
<!--            </a>-->
<!--          </li>-->
<!--          <li class="nav-item">-->
<!--            <a class="nav-link active" th:href="@{/entry}">-->
<!--              <span data-feather="file" ></span>-->
<!--              书籍录入-->
<!--            </a>-->
<!--          </li>-->
<!--          <li class="nav-item">-->
<!--            <a class="nav-link" th:href="@{/borrow}">-->
<!--              <span data-feather="shopping-cart"></span>-->
<!--              借阅信息-->
<!--            </a>-->
<!--          </li>-->
<!--          <li class="nav-item">-->
<!--            <a class="nav-link" th:href="@{/management}">-->
<!--              <span data-feather="users"></span>-->
<!--              用户管理-->
<!--            </a>-->
<!--          </li>-->
<!--          <li class="nav-item">-->
<!--            <a class="nav-link" th:href="@{/user}">-->
<!--              <span data-feather="bar-chart-2"></span>-->
<!--              个人信息-->
<!--            </a>-->
<!--          </li>-->
<!--        </ul>-->
<!--      </div>-->
<!--      <div class="a1">-->
<!--        <a th:href="@{/logout}"><input type="submit" class="btn btn-primary btn-block" value="登出"></input></a>-->
<!--      </div>-->

<!--    </nav>-->

    <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
      <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
        <h1 class="h2">书籍录入</h1>
        <div class="btn-toolbar mb-2 mb-md-0">
          <div class="btn-group me-2">
            <button type="button" class="btn btn-sm btn-outline-secondary">添加</button>
            <button type="button" class="btn btn-sm btn-outline-secondary">修改</button>
          </div>
          <input type="date">
        </div>
      </div>


      <div class="layui-body layui-container"
           style="margin : 10px auto; padding:10px 16px ;border: 200px; width: 480px; height: 580px; background-color: #f2f2f2">

        <hr class="layui-bg-blue">
        <h2 style="text-align:center">添加书籍</h2>
        <hr class="layui-bg-blue">

        <div style="width: 420px; padding: 20px; margin: auto auto; background-color: #f2f2f2">
          <form class="layui-form" id="addBookForm" th:action="@{/save}" th:object="${book}" method="post">
               <input type="hidden" th:field="${book.bookId}">
            <div class="layui-form-item">
              <div class="layui-input-inline">
                 书 名  <input required lay-verify="required" id="bookName" type="text" name="bookName"
                       placeholder="请输入书名" th:field="${book.bookname}" autofocus
                       class="layui-input" autocomplete="off" >
              </div>
            </div><br>

            <div class="layui-form-item">
             <div class="layui-input-inline">
                作 者  <input id="bookAuthor" lay-verify="required" type="text" name="bookAuthor" placeholder="请输入作者" th:field="${book.author}"
                autocomplete="off" class="layui-input">
              </div>
            </div><br>

<!--            <div class="layui-form-item">-->
<!--              <div class="layui-input-inline">-->
<!--                出版社 <input id="bookPublish" lay-verify="required" type="text" name="bookPublish"-->
<!--                       placeholder="请输入出版社" autocomplete="off"-->
<!--                       class="layui-input">-->
<!--              </div>-->
<!--            </div><br>-->

            <div class="layui-form-item">
              <div class="layui-input-inline">
                 类 别<input id="bookCategory" lay-verify="required" type="text" name="bookCategory"
                           placeholder="请输入类别" th:field="${book.bookcategory}" autocomplete="off"
                           class="layui-input">
                </select>
              </div>
            </div><br>

<!--            <div class="layui-form-item">-->
<!--              <div class="layui-input-inline">-->
<!--                 价 格  <input id="bookPrice" lay-verify="number" type="text" name="bookPrice" placeholder="￥"-->
<!--                       autocomplete="off" class="layui-input">-->
<!--              </div>-->
<!--            </div><br>-->

            <div class="layui-form-item layui-form-text">
              <div class="layui-input-inline">

                借阅情况
                <select class="selectpicker" th:field="${book.borrowingsituation}" th:value="${book.borrowingsituation}">
                  <option th:selected="${book.borrowingsituation=='借阅中'}" value="借阅中" >借阅中</option>
                  <option   th:selected="${book.borrowingsituation=='在馆'}" value="在馆">在馆</option>
                </select>
<!--                <textarea id="bookIntroduction" lay-verify="required" name="bookIntroduction" placeholder="请输入简介" th:field="${book.borrowingsituation}"-->
<!--                              class="layui-textarea "-->
<!--                              autocomplete="off"></textarea>-->
              </div>
            </div><br>
            <div style="margin-left: 100px">
              <input type="submit" lay-filter="btn1" id="btn1" class="layui-btn" lay-submit="" value="添加图书">
            </div>
          </form>
        </div>
      </div>
    </main>
  </div>
</div>


<script th:src="@{/assets/dist/js/bootstrap.bundle.min.js}"></script>

<script src="https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js" integrity="sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js" integrity="sha384-zNy6FEbO50N+Cg5wap8IKA4M/ZnLJgzc6w2NqACZaK0u0FXfOWRRJOnQtpZun8ha" crossorigin="anonymous"></script><script th:src="@{/js/dashboard.js}"></script>
</body>
</html>